/*
 * DimensionsXML.java
 *
 * Created on 18 sierpień 2007, 16:56
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package pl.krakow.ae.knp.wikiboard.xml;

import nu.xom.*;

/**
 *
 * @author Michał
 */
public class DimensionsXML {
    
    private int w,h;
    
    /** Creates a new instance of DimensionsXML */
    public DimensionsXML(int w, int h) {
        this.w=w;
        this.h=h;
    }
    
    public Element getXML() {
        Element dimensions = new Element("dimensions");
        Element eW = new Element("w");
        Element eH = new Element("h");
        eW.appendChild(String.valueOf(w));
        eH.appendChild(String.valueOf(h));
        dimensions.appendChild(eW);
        dimensions.appendChild(eH);
        return dimensions;
    }    
}
